#!/bin/bash
BACKUP_DIR="/backups/mysql"
DB_USER="root"
DB_PASS="password"
DATE=$(date +%F)
mysqldump -u$DB_USER -p$DB_PASS --all-databases > $BACKUP_DIR/db_backup_$DATE.sql
gzip $BACKUP_DIR/db_backup_$DATE.sql
